Allocation Session Reservation (ASR)
Starting with StorNext 4.2, the Allocation Session Reservation (ASR) feature provides another method of allocating space to regular files. ASR optimizes on-disk allocation behavior in workflows (such as some rich media streaming applications) which write and read sequences of files of certain sizes in specific directories.
With ASR, file sequences in a directory are usually placed on disk based on the order in which they are written. ASR keeps these files together even if other applications are writing at the same time in different directories or from different StorNext clients. The feature also has the ability to reduce file system free space fragmentation since collections of files which are written together are then typically removed together.
The workflows which see reduced free space fragmentation are those which have concurrent applications each writing files in their own directories and using files mostly larger than 1MB each. With this kind of workflow, when a collection of files from one application is removed, the space is freed up in big chunks which are independent of other application runs.
Some workflows will see worse performance and may also see more free space fragmentation with ASR. These workflows are those which have concurrent applications all using the same directory on the same client, or all writing the same file on different clients. Additionally, performance may be adversely affected when stripe groups are configured and used to distribute applications. See How ASR Works.
Some applications depend on stripe alignment for performance. Stripe alignment can cause the allocator to chop an allocation request to make its head and tail land on a stripe boundary. The ASR feature disables stripe alignment since the chopping can lead to even more free space fragmentation since the chopping is within ASR chunks.
Customers should run with ASR and see if performance is adversely affected. You can do this by turning On or Off by setting the size in the configuration file or via the StorNext GUI and then restarting the FSM. Then, run your application and measure performance.
The fact that files are kept together on a stripe group for the ASR chunk size may improve performance and make stripe alignment unnecessary.
The ideal situation is for a system administrator to watch the system both with and without ASR enabled. First, performance should be monitored. Second, fragmentation can be checked. There are two kinds of fragmentation:
- Fragmentation within files.
- Free space fragmentation.
Fragments within a collection of files can be counted using snfsdefrag(1), for example, snfsdefrag -t -r -c <directory>
. This command lists all the files and the number of extents in each file, and then the total of all regular files, extents, and extents per file.
Note: Beginning with StorNext 6, use the sgoffload
command instead of the snfsdefrag
command. The sgoffload
command moves extents belonging to files that are currently in use (open). The sgoffload
command also informs the client to suspend I/O for a time, moves the data, then informs the client to refresh the location of the data and resume I/O.
The command, cvfsck -a -f <file system>
lists free space fragments on each stripe group by chunk size, the total number of free space fragments for each stripe group, and then the total number of stripe groups and free space fragments for the entire file system. With this tool, free space fragments can be counted before and after a workflow is run. (“Workflows” should include normal administrative cleanup and modifications which occur over time.)
Administrators are encouraged to monitor their system to see how fragmentation is occurring.
The snfsdefrag(1)
command can be run periodically to defragment files, reducing the number of fragments in those files. This usually helps reduce free space fragmentation, too.